package org.gap.jseed.annotation;

public class BeanUtil {
	/**
	 * Extracts the property from the method
	 * @param each
	 * @return
	 */
	public static String getPropertyName(String  name) {
		String result = name;
		if (name.startsWith("is")) {
			result = name.substring(2);
		} else if (name.startsWith("set") || name.startsWith("get") || name.startsWith("add")){
			result = name.substring(3);
		} else if (name.startsWith("remove")) {
			result = name.substring("remove".length());
		}
		return result;
	}
}
